<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!-- 兼容性 -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <title>基础设置-项目构成</title>
    <script src="/scripts/boot.js"></script>
    <style>
        html,body{
            margin:0;padding: 0;border:0;width:100%;height:100%;overflow:hidden;
        }
        body{
            background: #ffffff!important;
            padding:20px;
        }
        .mini-tab{
            background: #ffffff;
            border: 1px solid #ffffff;
        }
        .mini-tabs-space,.mini-tabs-space2{
            border-bottom: solid 1px #ffffff;
        }
        .mini-tabs-plain .mini-tab-text{
            line-height: 32px;
        }
        .mini-tab-active{
            position: relative;
            color: #02ccc3;
            font-family: '微软雅黑';
        }
        .mini-tab-active:after {
            content: "";
            position: absolute;
            width: 100%;
            height: 2px;
            left: 0;
            bottom: -2px;
            background: #02ccc3;
            /*border-bottom: 2px solid #02ccc3;*/
            /*border-bottom-left-radius: 3px;*/
            /*border-bottom-right-radius: 3px;*/

        }
        .mini-tabs-scrollCt{
            margin-bottom: 10px;
        }
        .mini-tabs-header{
            border-bottom: 1px solid #edf0f7;
        }
        .container{
            display: block;
            width: 100%;
            height: auto;
            overflow: hidden;
            margin-bottom: 30px;
        }
        .container_box{
            width: 100%;
            display: flex;
            margin-bottom: 30px;
        }
        .container_div{
            width: 20%;
            text-align: center;
            height: auto;
            position: relative;
            z-index: 99;
            border-right: 1px solid #dadee6;
        }
        .container_div:last-child{
            border-right: 1px solid #ffffff;
            /*position: absolute;*/
            /*right: 1px;*/
            /*z-index: 9999;*/
            /*!*content: "";*!*/
            /*width: 1px;*/
            /*color: #dadee6;*/
            /*height: 50px;*/
            /*line-height: 50px;*/
            /*display: inline-block;*/
        }
        .sumText{
            height: 60px;
            line-height: 60px;
            font-size: 14px;
        }
        .title-staging-text{
            color: #333333;
            font-size: 14px;
            padding-left: 5px;
            display: inline-block;
            position: absolute;
            z-index: 99;
            line-height: 48px;
        }
        .staging-btn{
            font-size: 14px;
            width: 88px;
            height: 32px;
            line-height: 32px;
            padding: 0 16px;
            text-decoration: none;
            color: #02ccc3;
            border-radius: 5px;
            display: inline-block;
            cursor: pointer;
            text-align: center;
            border: 1px solid #02ccc3;
            background: #ffffff;
        }
        .staging-c-btn{
            color: #ffffff;
            background: #02ccc3;
        }
        .mini-tab .mini-tab-text{
            position: relative;
        }
        .badge{
            padding:0 4px;
            font-size: 12px;
            height: 15px;
            line-height: 15px;
            border-radius: 4px;
            color: #ffffff;
            background: #02ccc3;
            position: absolute;
            top: -2px;
            right: -10px;
            display: none;
            z-index: 9999;
        }
    </style>
</head>
<body>
<div class="title-list mb-20"><span class="title-listbg"></span><span>快捷入口</span></div>
<div class="container">
    <div class="title-div">本月我的计划</div>
    <div class="container_box">
        <div class="mini-clearfix container_div">
            <div><span class="f20" id="sub_1" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">全部任务</div>
        </div>
        <div class="container_div">
            <div><span class="f20" id="sub_2" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">未开始</div>
        </div>
        <div class="container_div title-green">
            <div><span class="f20" id="sub_3" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">进行中任务</div>
        </div>
        <div class="container_div title-yellow">
            <div class="title-yellow"><span class="f20" id="sub_4" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">逾期/失控任务</div>
        </div>
        <div class="container_div title-blue">
            <div class="title-blue"><span class="f20" id="sub_5" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">已完成任务</div>
        </div>
    </div>
    <div class="title-div">本月关注计划</div>
    <div class="mini-clearfix container_box">
        <div class="container_div">
            <div><span class="f20" id="allFollow" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">全部任务</div>
        </div>
        <div class="container_div title-red">
            <div class="title-red"><span class="f20" id="runawayNumber" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">失控任务</div>
        </div>
        <div class="container_div title-green">
            <div><span class="f20" id="runningNumber" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">进行中任务</div>
        </div>
        <div class="container_div title-yellow">
            <div><span class="f20" id="overNumber" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">逾期任务</div>
        </div>
        <div class="container_div title-orange">
            <div class="title-orange"><span class="f20" id="riskNumber" style="cursor:pointer;">0</span><span class="sub">个</span></div>
            <div class="f10">有风险</div>
        </div>
  </div>
    <!--<div class="mini-clearfix container_box">-->
        <!--<div class="sumText">-->
            <!--<span>本月被考核金额</span>-->
            <!--<span>1233</span><span>元</span>-->
            <!--<a>查看明细</a>-->
        <!--</div>-->
    <!--</div>-->
</div>
<div class="mini-fit" style="position: relative;z-index: 20">
    <div class="title-staging-text" style=""><span class="title-listbg"></span><span>消息提醒</span></div>
    <div id="tabs1" class="mini-tabs" TabAlign="right" activeIndex="0" style="width:100%;height:100%;" bodyStyle="padding:0;border:0;">
        <div title="预警通知<span class='badge badge-danger' id='daibanrenwuCount1'></span>" onclick="list.warning()">
            <!--  url="/planNodeAdjust/affectedListByPage" -->
            <div class="mini-clearfix mb-10">
                <div class="mini-col-6 mini-col-sm-3">
                    <a class="staging-btn staging-c-btn mR-20"  onclick="list.qbll('1')">全部</a>
                    <a class="staging-btn mR-20" onclick="list.unread('2')">未读</a>
                </div>
            </div>
            <div id="datagrid1" class="mini-datagrid" style="width:100%;height:350px;"
                 url="/notify/listByPage"  idField="id" sizeList="[5,10,20,50]" pageSize="10" showEmptyText="true" emptyText="暂无数据" alwaysShowEmptyText="true">
                <div property="columns">
                <!--    <div field="id" headerAlign="center" width="30" align="center" id="number">编号</div>-->
                    <div field="content" width="300" headerAlign="center"  allowSort="false">预警标题</div>
                    <div field="createDate" width="80" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd HH:mm:ss">发送时间</div>
                    <div field="method" id="method1" width="80" align="center" headerAlign="center" allowSort="false">发送方式</div>
                    <div field="sName" width="80" headerAlign="center" align="center" allowSort="false">发送人</div>
                   <div name="action" width="100" headerAlign="center" align="center" allowSort="false">操作</div>
                </div>
            </div>
        </div>
        <div title="汇报提醒<span class='badge badge-danger' id='daibanrenwuCount2'></span>">
            <div class="mini-clearfix mb-10">
                <div class="mini-col-6 mini-col-sm-3">
                    <a class="staging-btn staging-c-btn mR-20"  onclick="list.qbll1('1')">全部</a>
                    <a class="staging-btn mR-20"  onclick="list.unread1('2')">未读</a>
                </div>
            </div>
            <div id="datagrid2" class="mini-datagrid" style="width:100%;height:350px;"onclick="list.report()"
                 url="/notify/affectedListByPage" idField="id" sizeList="[5,10,20,50]" pageSize="10" showEmptyText="true" emptyText="暂无数据" alwaysShowEmptyText="true">
                <div property="columns">
                    <div field="content" width="300" headerAlign="center" allowSort="false">汇报标题</div>
                    <div field="createDate" width="80" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd HH:mm:ss">发送时间</div>
                    <div field="method" width="80" align="center" headerAlign="center" allowSort="false">发送方式</div>
                    <div field="sName" width="80" headerAlign="center" align="center" allowSort="false">发送人</div>
                    <div name="action1" width="100" headerAlign="center" align="center" allowSort="false">操作</div>
                </div>
            </div>
        </div>
        <div title="考核提醒<span class='badge badge-danger' id='daibanrenwuCount'></span>">
            <div class="mini-clearfix mb-10">
                <div class="mini-col-6 mini-col-sm-3">
                    <a class="staging-btn staging-c-btn mR-20"  onclick="list.qbll3('1')">全部</a>
                    <a class="staging-btn mR-20"  onclick="list.unread3('2')">未读</a>
                </div>
            </div>
            <div id="datagrid3" class="mini-datagrid" style="width:100%;height:350px;" onclick="list.flow()"
                 url="/notify/needListByPage" idField="id" sizeList="[5,10,20,50]" pageSize="10" showEmptyText="true" emptyText="暂无数据" alwaysShowEmptyText="true">
                <div property="columns">
                    <div field="content" width="300" headerAlign="center" allowSort="false">考核标题</div>
                    <div field="createDate" width="80" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd HH:mm:ss">发送时间</div>
                    <!--<div field="editDate" width="80" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd HH:mm:ss">结束时间</div>-->
                    <div field="type" width="80" headerAlign="center" align="center" allowSort="false">状态</div>
                    <div name="action3" width="100" headerAlign="center" align="center" allowSort="false">操作</div>
                </div>
            </div>
        </div>
        <div title="待办通知<span class='badge badge-danger' id='daibanrenwuCount4'></span>">
            <div class="mini-clearfix mb-10">
                <div class="mini-col-6 mini-col-sm-3">
                    <a class="staging-btn staging-c-btn mR-20"  onclick="list.qbll4('1')">全部</a>
                    <a class="staging-btn mR-20"  onclick="list.unread4('2')">未读</a>
                </div>
            </div>
            <div id="datagrid4" class="mini-datagrid" style="width:100%;height:350px;" onclick="list.confirm()"
                 url="/notify/confirmListByPage" idField="id" sizeList="[5,10,20,50]" pageSize="10" showEmptyText="true" emptyText="暂无数据" alwaysShowEmptyText="true">
                <div property="columns">
                    <div field="content" width="300" headerAlign="center" allowSort="false">待办标题</div>
                    <div field="createDate" width="80" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd HH:mm:ss">发送时间</div>
                  <!--  <div field="editDate" width="80" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd HH:mm:ss">结束时间</div>-->
                    <div field="type" width="100" headerAlign="center" align="center" allowSort="false">状态</div>
                    <div name="action4" width="100" headerAlign="center" align="center">操作</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    sub_1.onclick=function(){
        var state = $("#sub_1").text();
        if (state > 0) {
            window.location.href = "/program/monthlyPlan/list.html";
        }

    }
    sub_2.onclick=function(){
        var state = $("#sub_2").text();

        var type = 1;
        if (state > 0) {
            window.location.href = "/program/monthlyPlan/list.html?state=" + type;
        }

    }
    sub_3.onclick=function(){
        var state = $("#sub_3").text();
        var type = 2;
        if (state > 0) {
            window.location.href = "/program/monthlyPlan/list.html?state=" + type;
        }

    }
    sub_4.onclick=function(){
        var state = $("#sub_4").text();
        var  type = 7;
        if (state > 0){
        window.location.href="/program/monthlyPlan/list.html?state="+type;
        }
    }
    sub_5.onclick=function(){
        var state = $("#sub_5").text();
        var  type = [5,6];
        if (state > 0) {
            window.location.href = "/program/monthlyPlan/list.html?state=" + type;
        }

    }
    //关注全部
    allFollow.onclick=function(){
        var state = $("#allFollow").text();
        if (state > 0) {
            window.location.href = "/staging/monthlist.html";
        }

    }
    //失控
    runawayNumber.onclick=function(){
        var state = $("#runawayNumber").text();
        var type = 23;
        if (state > 0) {
            window.location.href = "/staging/monthlist.html?state=" + type;
        }

    }
    //运行中
    runningNumber.onclick=function(){
        var state = $("#runningNumber").text();
        var type = 2;
        if (state > 0) {
            window.location.href = "/staging/monthlist.html?state=" + type;
        }

    } //逾期
    overNumber.onclick=function(){
        var state = $("#overNumber").text();
        var type = 7;
        if (state > 0) {
            window.location.href = "/staging/monthlist.html?state=" + type;
        }

    } //风险
    riskNumber.onclick=function(){
        var state = $("#riskNumber").text();
        var type = 1;
        if (state > 0) {
            window.location.href = "/staging/monthlist.html?state=" + type;
        }

    }
    $(function(){
        needListByPage1();
        listByPage1();
        affectedListByPage1();
        confirmListByPage1();
       $("#method").text(12);
        $.ajax({
            url:"/monthlyPlanExecution/workbenchCount",
            success: function (text) {
                $("#sub_1").text(text.allTasks);//全部任务
                if(text.notStartedTasks==null){
                    $("#sub_2").text(0);//未开始
                }else{
                    $("#sub_2").text(text.notStartedTasks);//未开始
                }
                if(text.Tasksing==null){
                    $("#sub_3").text(0);//未开始
                }else{
                    $("#sub_3").text(text.Tasksing);//进行中
                }

                if(text.overdueTasks==null){
                    $("#sub_4").text(0);//未开始
                }else{
                    $("#sub_4").text(text.overdueTasks);//逾期
                }

                if(text.completeTasks==null){
                    $("#sub_5").text(0);//未开始
                }else{
                    $("#sub_5").text(text.completeTasks);//已完成
                }

            }

        });
        
        $.ajax({
            url:"/monthformation/stat",
            success: function (text) {
            	var text = $.parseJSON(text);  
                $("#allFollow").text(text.body.allFollow);//全部任务
                $("#runawayNumber").text(text.body.runawayNumber);//失控
                $("#runningNumber").text(text.body.runningNumber);//运行中
                $("#overNumber").text(text.body.overNumber);//逾期
                $("#riskNumber").text(text.body.riskNumber);//风险

            }

        });
    });


    var grid,gridbreak,grid2,grid3,grid4,number;

    var list = {
        //页面初始化
        init: function() {
            mini.parse();
            // //预警
            mini.get("datagrid1").load();
            //汇报提醒
            mini.get("datagrid2").load();
            //待办提醒
            mini.get("datagrid3").load();
            //确认通知
            mini.get("datagrid4").load();
            grid = mini.get("datagrid1");
            grid.load();
            //预警
            grid = mini.get("datagrid1").on("drawcell", function (e) {
              //  alert(4)
                var record = e.column;
                var row = e.row;
                var estate = e.row.estate;
               // var planNode = e.row.planNode;
                if(record.field=="method") {
                    if (e.value == "1") {
                        e.cellHtml = "系统发送";
                    } else {
                        e.cellHtml = "人员发送";
                    }
                }
                if(record.field=="type") {
                    if (e.value == "6" || e.value == "7" ) {
                        e.cellHtml = "预警";
                    }
                }
                if (record.field == "content") {
                    e.cellHtml = '<a style="cursor:pointer;text-decoration:none;" href="javascript:list.view()">'+e.row.content+' </a>';
                }
                if (record.name == "action") {
                    if(estate==0){


                        e.cellHtml = '<a class="check-botton" id="estate" style="cursor:default;    color: darkgrey;"> 未读</a>';
                    }else {
                        e.cellHtml = '<a class="revise-botton" id="estate" style="cursor:default;"> 已读</a><a class="del-botton btn-bd" onclick="list.datagrid1remove()">删除</a>';
                    }
                }



            })
            grid = mini.get("datagrid2").on("drawcell", function (e) {
                //  汇报
                var record = e.column;
                var estate = e.row.estate;
                if(record.field=="method") {
                    if (e.value == "1") {
                        e.cellHtml = "系统发送";
                    } else {
                        e.cellHtml = "人员发送";
                    }
                }
                if(record.field=="type") {
                    if (e.value == "3") {
                        e.cellHtml = "汇报";
                    }
                }
                if (record.field == "content") {
                    e.cellHtml = '<a style="cursor:pointer;text-decoration:none;" href="javascript:list.view2()">'+e.row.content+' </a>';
                }
                if (record.name == "action1") {
                    if(estate==0){
                        number =
                        e.cellHtml = '<a class="check-botton" id="estate" style="cursor:default;    color: darkgrey;"> 未读</a>';
                    }else {
                        e.cellHtml = '<a class="revise-botton" id="estate"style="cursor:default;"> 已读</a><a class="del-botton btn-bd" onclick="list.datagrid2remove2()">删除</a>';
                    }
                }

            })
//考核 提醒
            grid = mini.get("datagrid3").on("drawcell", function (e) {
                //  alert(4)
                var record = e.column;

                var estate = e.row.estate;
                if(record.field=="type") {
                    if (e.value == "5") {
                        e.cellHtml = "考核";
                    }
                }
                if (record.field == "content") {
                    e.cellHtml = '<a style="cursor:pointer;text-decoration:none;" href="javascript:list.view3()">'+e.row.content+' </a>';
                }
                if (record.name == "action3") {
                    if(estate==0){

                        e.cellHtml = '<a class="check-botton" id="estate"style="cursor:default;    color: darkgrey;"> 未读</a>';
                    }else {
                        e.cellHtml = '<a class="revise-botton" id="estate"style="cursor:default;"> 已读</a><a class="del-botton btn-bd" onclick="list.datagrid3remove3()">删除</a>';
                    }
                }

            })
            //待办 提醒
            grid = mini.get("datagrid4").on("drawcell", function (e) {

                var record = e.column;
                var estate = e.row.estate;

                if(record.field=="type") {
                    if (e.value == "1") {
                       e.cellHtml = "待办";
                     }
                }
                if (record.field == "content") {
                    e.cellHtml = '<a style="cursor:pointer;text-decoration:none;" href="javascript:list.view4()">'+e.row.content+' </a>';
                }
                if (record.name == "action4") {
                    if(estate==0){

                        e.cellHtml = '<a class="check-botton" id="estate"style="cursor:default;    color: darkgrey;"> 未读</a>';
                    }else {
                        e.cellHtml = '<a class="revise-botton" id="estate"style="cursor:default;"> 已读</a><a class="del-botton btn-bd" onclick="list.datagrid4remove4()">删除</a>';
                    }
                }
            })
           // list.gridWork.grid();
            $(".staging-btn").on('click',function(){
                $(this).addClass("staging-c-btn").siblings().removeClass("staging-c-btn");
            });
        },
        //预警
        view:function(){
            var row = mini.get("datagrid1").getSelected();
            if (row) {
                mini.open({
                    url: "/program/monthlyPlan/view.html",
                    title: "查看节点计划申请", width: 1100, height: 700,
                    onload: function () {
                        var data = {"id":row.planNode};
                        var iframe = this.getIFrameEl();
                        iframe.contentWindow.view.SetData(data);
                    },
                    ondestroy: function (action) {
                        listByPage1();
                        mini.get("datagrid1").reload();
                    }

                });
                $.ajax({
                    url: ("/notify/edit"),
                    type: "post",
                    data: {
                        "id":row.id
                    },
                })
            } else {
                alert("请选中一条记录");
            }
    },   //  汇报
        view2:function(){
            var row = mini.get("datagrid2").getSelected();
            if (row) {
                mini.open({
                    url: "/program/monthlyPlan/view.html",
                    title: "查看节点计划申请", width: 1100, height: 700,
                    onload: function () {
                        var data = {"id":row.planNode};
                        var iframe = this.getIFrameEl();
                        iframe.contentWindow.view.SetData(data);
                    },
                    ondestroy: function (action) {
                        affectedListByPage1();
                        mini.get("datagrid2").reload();
                    }

                });
                $.ajax({
                    url: ("/notify/edit"),
                    type: "post",
                    data: {
                        "id":row.id
                    },
                })
            } else {
                alert("请选中一条记录");
            }
        },
        //考核提醒
        view3:function(){
         var row = mini.get("datagrid3").getSelected();
         if (row) {
          mini.open({
              url: "/program/monthlyPlan/view.html",
              title: "查看节点计划申请", width: 1100, height: 700,
              onload: function () {
                  var data = {"id":row.planNode};
                  var iframe = this.getIFrameEl();
                  iframe.contentWindow.view.SetData(data);
              },
              ondestroy: function (action) {
                  needListByPage1();
                  mini.get("datagrid3").reload();
              }

          });
          $.ajax({
              url: ("/notify/edit"),
              type: "post",
              data: {
                  "id":row.id
              },
          })
      } else {
          alert("请选中一条记录");
      }
  },//待办提醒
        view4:function(){
            var row = mini.get("datagrid4").getSelected();
            if (row) {
                mini.open({
                    url: "/program/monthlyPlan/view.html",
                    title: "查看节点计划申请", width: 1100, height: 700,
                    onload: function () {
                        var data = {"id":row.planNode};
                        var iframe = this.getIFrameEl();
                        iframe.contentWindow.view.SetData(data);
                    },
                    ondestroy: function (action) {
                        confirmListByPage1();
                        mini.get("datagrid4").reload();
                    }

                });
                $.ajax({
                    url: ("/notify/edit"),
                    type: "post",
                    data: {
                        "id":row.id
                    },
                })
            } else {
                alert("请选中一条记录");
            }
        },
        unread:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid1").load(data);
        },
        qbll:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid1").load(data);
        },
        unread1:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid2").load(data);
        },
        qbll1:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid2").load(data);
        },
        unread2:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid2").load(data);
        },
        qbll2:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid2").load(data);
        },
        unread3:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid3").load(data);
        },  unread4:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid4").load(data);
        },
        qbll3:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid3").load(data);
        },
        qbll4:function(id){
            var data = {
                "estate":id,
            };
            mini.get("datagrid4").load(data);
        },
        //预警
        datagrid1remove:function(){

            var row = mini.get("datagrid1").getSelected();
            if (row) {
                mini.confirm("确定删除选中记录？","确定",function (action) {
                    if(action=="ok"){
                        $.ajax({
                            url: "/notify/del",
                            type : "post",
                            data:{"id":row.id},
                            success: function (text) {
                                if (text.state) {
                                    mini.get("datagrid1").reload();
                                } else {
                                    mini.showMessageBox({
                                        showModal: false,
                                        width: 250,
                                        title: "提示",
                                        iconCls: "mini-messagebox-warning",
                                        message: text.message,
                                    });

                                }
                            },
                            error:function (errorMsg) {
                                common.prompt(errorMsg.message);
                            }
                        });
                    }
                });
            }
           else {
                alert("请选中一条记录");
            }
        },
        //  汇报
        datagrid2remove2:function(){
            var row = mini.get("datagrid3").getSelected();
            if (row) {
                mini.confirm("确定删除选中记录？","确定",function (action) {
                    if(action=="ok"){
                        $.ajax({
                            url: "/notify/del",
                            type : "post",
                            data:{"id":row.id},
                            success: function (text) {
                                if (text.state) {
                                    common.prompt("删除成功");
                                    mini.get("datagrid2").reload();
                                } else {
                                    common.prompt(text.message);
                                }

                            },
                            error:function (errorMsg) {
                                common.prompt(errorMsg.message);
                            }
                        });
                    }
                });
            } else {
                alert("请选中一条记录");
            }
        },
        datagrid3remove3:function(){
            var row = mini.get("datagrid3").getSelected();
            if (row) {
                mini.confirm("确定删除选中记录？","确定",function (action) {
                    if(action=="ok"){
                        $.ajax({
                            url: "/notify/del",
                            type : "post",
                            data:{"id":row.id},
                            success: function (text) {
                                if (text.state) {
                                    common.prompt("删除成功");
                                    mini.get("datagrid3").reload();
                                } else {
                                    common.prompt(text.message);
                                }

                            },
                            error:function (errorMsg) {
                                common.prompt(errorMsg.message);
                            }
                        });
                    }
                });
            } else {
                alert("请选中一条记录");
            }
        },
        datagrid4remove4:function(){
            var row = mini.get("datagrid4").getSelected();
            if (row) {
                mini.confirm("确定删除选中记录？","确定",function (action) {
                    if(action=="ok"){
                        $.ajax({
                            url: "/notify/del",
                            type : "post",
                            data:{"id":row.id},
                            success: function (text) {
                                if (text.state) {
                                    common.prompt("删除成功");
                                    mini.get("datagrid4").reload();
                                } else {
                                    common.prompt(text.message);
                                }

                            },
                            error:function (errorMsg) {
                                common.prompt(errorMsg.message);
                            }
                        });
                    }
                });
            } else {
                alert("请选中一条记录");
            }
        },
        setDate:function(){

        },
        //预警通知
        warning: function () {

        },
        //汇报提醒
        report: function () {

        },
        //待辦提醒
        flow: function () {


        },
        //确认通知
        confirm: function () {

        }
    };
    list.init();
   function needListByPage1() {

       var id = 2;
       $.ajax({
           url: "/notify/needListByPage1",
           type: "post",
           data: {
               "estate": id,
               "pageIndex": 0,
               "pageSize": 10
           }, success: function (text) {
               var jsObject = JSON.parse(text);
               var total = jsObject.total;
               if(total>0){
                   $("#daibanrenwuCount").show();
                   $("#daibanrenwuCount").text(total);
               }else{
                   $("#daibanrenwuCount").attr("style","display:none;");
               }
           }
       })
   }

//预警消息
    function listByPage1() {

        var id = 2;
        $.ajax({
            url: "/notify/listByPage",
            type: "post",
            data: {
                "estate": id,
                "pageIndex": 0,
                "pageSize": 10
            }, success: function (text) {
                var jsObject = JSON.parse(text);
                var total = jsObject.total;
                if(total>0){
                    $("#daibanrenwuCount1").show();
                    $("#daibanrenwuCount1").text(total);
                }else{
                    $("#daibanrenwuCount1").attr("style","display:none;");
                }
            }
        })
    }

    function affectedListByPage1() {

        var id = 2;
        $.ajax({
            url: "/notify/affectedListByPage1",
            type: "post",
            data: {
                "estate": id,
                "pageIndex": 0,
                "pageSize": 10
            }, success: function (text) {
                var jsObject = JSON.parse(text);
                var total = jsObject.total;
                if(total>0){
                    $("#daibanrenwuCount2").show();
                    $("#daibanrenwuCount2").text(total);
                }else {
                    $("#daibanrenwuCount2").attr("style","display:none;");
                }
            }
        })
    }

    function  confirmListByPage1(){

        var id = 2;
        $.ajax({
            url: "/notify/confirmListByPage1",
            type: "post",
            data: {
                "estate": id,
                "pageIndex": 0,
                "pageSize": 10
            }, success: function (text) {
                var jsObject = JSON.parse(text);
                var total = jsObject.total;
                if(total>0){
                    $("#daibanrenwuCount4").show();
                    $("#daibanrenwuCount4").text(total);
                }else{
                    $("#daibanrenwuCount4").attr("style","display:none;");
                }
            }
        })
    }
</script>
</body>
</html>